open(BUFF,"AgilentG4502A_07_3.adf");
open(WRBUFF,">agilent_plfm_3_withoutMIRNA_new.txt");
#print WRBUFF "gene\tentrezid\trefseq\n";
while($line=<BUFF>)
{
	chomp($line);
	@arr = split("\t",$line);
	if($arr[8] =~ m/\w/ && $arr[8] !~ m/\,/)
	{
		@array2 = ();
		@array2 = split(/\,/,$arr[8]);
		for($i=0;$i<@array2;$i++)
		{
			@array = ();
			@array = split(/\|/,$array2[$i]);	
			$array[0] =~ s/\t//g;
			$array[1] =~ s/\t//g;
			$array[0] =~ s/ //g;
                	$array[1] =~ s/ //g;
			if(($array[0] ne "" || $array[1] ne "" ) && $array[1] !~ m/\D/)
			{
				$line = $array[0]."\t".$array[1]."\t".$arr[10]."\n";
				if(!(exists($hash{$line})))
				{
					$hash{$line} = 1;
					print WRBUFF $line;
				}
			
			}
		}
	}
}
